<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>机器人测试</title>
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<script type="text/javascript">   
    function doSubmit(){  
       var info = $('#info').val()  
        var url='${pageContext.request.contextPath}/link/response.action';    
        $.get(url, {  
        info : info,  
        key : "96625c3189f54aafa043ea2db59d0e36"
    }, function(json) {  
        if(json != null){  
           alert(json);  
            document.getElementById("res").innerText = json;  
        }else{  
            document.getElementById("res").innerText = '无返回值';  
        }  
    });  
          }     
</script>
</head>

<body>
	<textarea rows="5" cols="" placeholder="请输入内容" name="info" id="info"></textarea>
	<br>
	<input type="button" onclick="doSubmit()" value="提交">
	<br>
	<label id="res"></label>
</body>
</html>
